home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Bus / S / Stock HELPER®.cpt / Stock HELPERÆ V0.2 / card_28475.txt < prev    next >
Text File  |  1988-03-23  |  5KB  |  239 lines

  1. -- card: 28475 from stack: in.2
  2. -- bmap block id: 29285
  3. -- flags: 4000
  4. -- background id: 2433
  5. -- name: Title Card
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global headerCard
  9.   put id of this card into headerCard
  10. end openCard
  11.  
  12.  
  13.  
  14. -- part 1 (button)
  15. -- low flags: 00
  16. -- high flags: 2000
  17. -- rect: left=239 top=307 right=341 bottom=272
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 2507 / 2507
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: First Help
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   go to card "Help Card"
  29. end mouseUp
  30.  
  31.  
  32.  
  33. -- part 4 (field)
  34. -- low flags: 80
  35. -- high flags: 0000
  36. -- rect: left=319 top=224 right=241 bottom=379
  37. -- title width / last selected line: 0
  38. -- icon id / first selected line: 0 / 0
  39. -- text alignment: 0
  40. -- font id: 3
  41. -- text size: 12
  42. -- style flags: 0
  43. -- line height: 16
  44. -- part name: Date for Update
  45. ----- HyperTalk script -----
  46. on closeField
  47.   global dateforUpdate
  48.   put card field "Date for Update" into dateforUpdate
  49. end closeField
  50.  
  51.  
  52. -- part 5 (button)
  53. -- low flags: 00
  54. -- high flags: A000
  55. -- rect: left=90 top=234 right=282 bottom=131
  56. -- title width / last selected line: 0
  57. -- icon id / first selected line: 12074 / 12074
  58. -- text alignment: 1
  59. -- font id: 0
  60. -- text size: 12
  61. -- style flags: 0
  62. -- line height: 16
  63. -- part name: Plot All
  64. ----- HyperTalk script -----
  65. on mouseUp
  66.   global headerCard
  67.   repeat with i=1 to number of cards
  68.     go card i
  69.     get the short name of background
  70.     if (it="Stock Chart") or (it="Advance-Decline Chart") then
  71.       send mouseUp to background button "Plot" of card i
  72.     end if
  73.   end repeat
  74.   go headerCard
  75. end mouseUp
  76.  
  77.  
  78.  
  79. -- part 6 (button)
  80. -- low flags: 00
  81. -- high flags: 2000
  82. -- rect: left=44 top=190 right=223 bottom=176
  83. -- title width / last selected line: 0
  84. -- icon id / first selected line: 0 / 0
  85. -- text alignment: 1
  86. -- font id: 0
  87. -- text size: 12
  88. -- style flags: 0
  89. -- line height: 16
  90. -- part name: Update All
  91. ----- HyperTalk script -----
  92. on mouseUp
  93.   global cardNr,headerCard,updateFlag,dateforupdate
  94.   ask "Date of Update"
  95.   if it is not empty then
  96.     put it into dateforupdate
  97.     put it into card field "Date for Update"
  98.     set cursor to 4
  99.     put 1 into cardNr
  100.     put false into cardFound
  101.     set lockscreen to true
  102.     repeat until cardFound or (cardNr>the number of cards)
  103.       go card cardnr
  104.       get the short name of background
  105.       if (it="Stock Chart") or (it="Advance-Decline Chart") then
  106.         QuickUpdate
  107.         put true into cardFound
  108.       else
  109.         add 1 to cardNr
  110.       end if
  111.     end repeat
  112.     set lockscreen to false
  113.     if cardFound then
  114.       put "openCard" into updateFlag
  115.       send tabKey to card "Update All"
  116.       put "OK" into updateFlag
  117.     end if
  118.   end if -- it is not empty
  119. end mouseUp
  120.  
  121.  
  122.  
  123. -- part 7 (button)
  124. -- low flags: 00
  125. -- high flags: A003
  126. -- rect: left=345 top=190 right=212 bottom=455
  127. -- title width / last selected line: 0
  128. -- icon id / first selected line: 0 / 0
  129. -- text alignment: 1
  130. -- font id: 0
  131. -- text size: 12
  132. -- style flags: 0
  133. -- line height: 16
  134. -- part name: Find by Symbol
  135. ----- HyperTalk script -----
  136. on mouseUp
  137.   Ask "What is the Symbol for the Stock or Indicator"
  138.   put it into SearchName
  139.   findString searchName,"Stock Symbol"
  140. end mouseUp
  141.  
  142.  
  143.  
  144. -- part 8 (button)
  145. -- low flags: 00
  146. -- high flags: A003
  147. -- rect: left=345 top=225 right=247 bottom=455
  148. -- title width / last selected line: 0
  149. -- icon id / first selected line: 0 / 0
  150. -- text alignment: 1
  151. -- font id: 0
  152. -- text size: 12
  153. -- style flags: 0
  154. -- line height: 16
  155. -- part name: Find by Name
  156. ----- HyperTalk script -----
  157. on mouseUp
  158.   Ask "What is the Name of the Stock or Indicator"
  159.   put it into SearchName
  160.   findString searchName,"Stock Name"
  161. end mouseUp
  162.  
  163.  
  164. -- part 9 (button)
  165. -- low flags: 00
  166. -- high flags: A003
  167. -- rect: left=345 top=260 right=282 bottom=455
  168. -- title width / last selected line: 0
  169. -- icon id / first selected line: 0 / 0
  170. -- text alignment: 1
  171. -- font id: 0
  172. -- text size: 12
  173. -- style flags: 0
  174. -- line height: 16
  175. -- part name: Find
  176. ----- HyperTalk script -----
  177. on mouseUp
  178.   ask "Find what?"
  179.   put it into searchName
  180.   if it is not empty then
  181.     set cursor to 4
  182.     set lockScreen to true
  183.     find searchName
  184.     if short name of this card is "Title card" then
  185.       answer searchName&&"not found"
  186.     end if
  187.     set lockScreen to false
  188.   end if
  189. end mouseUp
  190.  
  191.  
  192.  
  193. -- part 10 (button)
  194. -- low flags: 00
  195. -- high flags: A003
  196. -- rect: left=205 top=225 right=247 bottom=305
  197. -- title width / last selected line: 0
  198. -- icon id / first selected line: 0 / 0
  199. -- text alignment: 1
  200. -- font id: 0
  201. -- text size: 12
  202. -- style flags: 0
  203. -- line height: 16
  204. -- part name: Add New Item
  205. ----- HyperTalk script -----
  206. on mouseUp
  207.   answer "Type of item" with "Indicator" or "Adv-Dec Line" or "Stock"
  208.   put it into itemType
  209.   ask "Symbol of "&itemType
  210.   put it into ItemSymbol
  211.   ask "Name of "&itemType
  212.   put it into ItemName
  213.   if it is empty then
  214.     exit mouseUp
  215.   end if
  216.   if itemType="Adv-Dec Line" then
  217.     go card id 37418 -- Blank Advance-Decline Chart
  218.   else
  219.     go card id 36791 -- Blank Stock Chart Card
  220.   end if
  221.   domenu "Copy Card"
  222.   Ask "Place after:"
  223.   if it is empty then
  224.     go card id 37418
  225.   else
  226.     find it
  227.   end if
  228.   domenu "Paste Card"
  229.   put ItemSymbol into field "Stock Symbol"
  230.   put itemName into field "Stock Name"
  231.   send newCard
  232.   go card "Title Card"
  233. end mouseUp
  234.  
  235.  
  236.  
  237. -- part contents for card part 4
  238. ----- text -----
  239. 880318